package com.cxf.windex.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * @author chenxf
 * @date 3/8/2018
 * @description
 */
@Controller
@RequestMapping("")
public class HomeController {

  @RequestMapping(value = "/", method = RequestMethod.GET)
  public String index(Map<String, Object> map) {
    return "admin/login";
  }

  @RequestMapping(value = "index", method = RequestMethod.GET)
  public String adminIndex(Map<String, Object> map) {
    return "admin/index";
  }

  @RequestMapping(value = "admin/home", method = RequestMethod.GET)
  public String home(Map<String, Object> map) {
    return "admin/home";
  }

  @RequestMapping(value = "login", method = RequestMethod.GET)
  public String login(Map<String, Object> map) {
    return "admin/login";
  }

  @RequestMapping(value = "admin/js_list", method = RequestMethod.GET)
  public String js_list(Map<String, Object> map) {
    return "js_list";
  }

  @RequestMapping(value = "admin/article_list",method = RequestMethod.GET)
  public String articleList(Map<String,Object> map){
    return "article_list";
  }

  @RequestMapping(value = "admin/article_add",method = RequestMethod.GET)
  public String articleAdd(Map<String,Object> map){
    return "article_add";
  }

  @RequestMapping(value = "admin/notes_list",method = RequestMethod.GET)
  public String notesList(Map<String,Object> map){
    return "notes_list";
  }

  @RequestMapping(value = "admin/reset_pwd", method = RequestMethod.GET)
  public String pwd(Map<String, Object> map) {
    return "reset_pwd";
  }

}
